<?php

namespace App\Models\Voter;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxVoterTemplate extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'wx_voter_templates';

    public function getBannerAttribute($value){
        if($value && is_string($value)){
            return json_decode($value, true);
        }
        return [];
    }

}
